package com.tripwego.client.event;

import com.google.gwt.core.client.JsArray;
import com.google.gwt.event.shared.GwtEvent;
import com.tripwego.client.jsni.GeocoderResult;

public class InitListAddressEvent extends GwtEvent<InitListAddressEventHandler> {

	public static Type<InitListAddressEventHandler> TYPE = new Type<InitListAddressEventHandler>();

	private JsArray<GeocoderResult> results;

	public InitListAddressEvent(JsArray<GeocoderResult> results) {
		this.results = results;
	}

	@Override
	public Type<InitListAddressEventHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(InitListAddressEventHandler handler) {
		handler.handleInitListAddressEvent(this);
	}

	/**
	 * @return the results
	 */
	public JsArray<GeocoderResult> getResults() {
		return results;
	}

	/**
	 * @param results
	 *            the results to set
	 */
	public void setResults(JsArray<GeocoderResult> results) {
		this.results = results;
	}

}